﻿@using NewLife;
@using NewLife.Web;
@using XCode;
@{
    var fact = ViewBag.Factory as IEntityOperate;
    var page = ViewBag.Page as Pager;
}
<div class="tableTools-container">
    <div class="form-inline">
        <form action="@Url.Action(ViewContext.RouteData.Values["Action"] + "")@Html.Raw("?" + page.GetBaseUrl(false, true, true)) " method="post" role="form">
            <div class="form-group">
                @if (ManageProvider.User.Has(PermissionFlags.Insert))
                {
                    @Html.ActionLink("添加" + ViewContext.Controller.GetType().GetDisplayName(), "Add", null, new { @class = "btn btn-success btn-sm" })
                }
            </div>
            <div class="pull-right form-group">
                <div class="form-group">
                    <label for="Status" class="control-label">状态：</label>
                    @(Html.ForEnum<TaskStatus>("Status", false, true))
                </div>
                <div class="form-group">
                    <label for="Priority" class="control-label">优先级：</label>
                    @(Html.ForEnum<TaskPriorities>("Priority", true, true))
                </div>
                <div class="form-group">
                    <label class="control-label" for="ddlAdmin">负责人：</label>
                    @Html.ForDropDownList("masterid", UserX.FindAllWithCache(), "全部", true)
                </div>
                <div class="form-group hidden-md hidden-sm hidden-xs">
                    <label for="dtStart" class="control-label">时间：</label>
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="dtStart" id="dtStart" value="@Request["dtStart"]" dateformat="yyyy-MM-dd" class="form-control form_datetime" />
                    </div>
                </div>
                <div class="form-group hidden-md hidden-sm hidden-xs">
                    <label for="dtEnd" class="control-label">至</label>
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="dtEnd" id="dtEnd" value="@Request["dtEnd"]" dateformat="yyyy-MM-dd" class="form-control form_datetime" />
                    </div>
                </div>
                <div class="input-group">
                    <span class="input-group-addon">
                        <i class="ace-icon fa fa-check"></i>
                    </span>
                    <input name="q" type="search" id="q" value="@Request["q"]" class="form-control" placeholder="搜索关键字" />
                    <span class="input-group-btn">
                        <button type="submit" class="btn btn-purple btn-sm">
                            <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
                            查询
                        </button>
                    </span>
                </div>
            </div>
        </form>
    </div>
</div>